package com.medical.doctor.controller;

import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.medical.common.log.annotation.Log;
import com.medical.common.log.enums.BusinessType;
import com.medical.common.security.annotation.RequiresPermissions;
import com.medical.doctor.domain.MedicalMedic;
import com.medical.doctor.service.IMedicalMedicService;
import com.medical.common.core.web.controller.BaseController;
import com.medical.common.core.domain.Result;
import com.medical.common.core.utils.poi.ExcelUtil;
import com.medical.common.core.domain.Result;import com.medical.common.core.domain.Result;
import com.medical.common.core.web.page.TableDataInfo;

/**
 * 医生列表Controller
 * 
 * @author medical
 * @date 2024-07-28
 */
@RestController
@RequestMapping("/medic")
public class MedicalMedicController extends BaseController
{
    @Autowired
    private IMedicalMedicService medicalMedicService;

    /**
     * 查询医生列表列表
     */
    @RequiresPermissions("doctor:medic:list")
    @GetMapping("/list")
    public Result<TableDataInfo> list(MedicalMedic medicalMedic)
    {
        startPage();
        List<MedicalMedic> list = medicalMedicService.selectMedicalMedicList(medicalMedic);
        return getDataTable(list);
    }

    /**
     * 获取医生userId信息
     */
    @GetMapping(value = "/getUserId/{id}")
    public Result getInfo(@PathVariable("id") Long id)
    {
        Long data = medicalMedicService.selectMedicalMedicById(id);
        return Result.success(data);
    }
}
